package com.ckzp.weixin.service;

import com.alibaba.fastjson.JSON;
import com.ckzp.core.util.XmlUtil;

/**
 * Created by 51594 on 2023/4/3.
 */
public class ServiceRequest {

    private String ToUserName;
    private String FromUserName;
    private String CreateTime;
    private String MsgType;
    private String Content;
    private String MsgId;
    private String Encrypt;

    //msgtype event
    private String Event;//事件类型
    private String EventKey;//事件KEY值
    private String MenuID;//菜单ID
    //msgtype image
    private String PicUrl;
    private String MediaId;
    //msgtype voice
    private String Format;
    private String Recognition;//翻译的语音

    // msgType  location
    //location
    private String Location_X;//翻译的语音
    private String Location_Y;//翻译的语音
    private String Scale;//翻译的语音
    private String Label;//翻译的语音

    //msgtype file
    private String Title;
    private String Description;
    private String FileKey;
    private String FileMd5;
    private String FileTotalLen;

    public String getToUserName() {
        return ToUserName;
    }

    public void setToUserName(String toUserName) {
        ToUserName = toUserName;
    }

    public String getFromUserName() {
        return FromUserName;
    }

    public void setFromUserName(String fromUserName) {
        FromUserName = fromUserName;
    }

    public String getCreateTime() {
        return CreateTime;
    }

    public void setCreateTime(String createTime) {
        CreateTime = createTime;
    }

    public String getMsgType() {
        return MsgType;
    }

    public void setMsgType(String msgType) {
        MsgType = msgType;
    }

    public String getContent() {
        return Content;
    }

    public void setContent(String content) {
        Content = content;
    }

    public String getMsgId() {
        return MsgId;
    }

    public void setMsgId(String msgId) {
        MsgId = msgId;
    }

    public String getEncrypt() {
        return Encrypt;
    }

    public void setEncrypt(String encrypt) {
        Encrypt = encrypt;
    }

    public String getEvent() {
        return Event;
    }

    public void setEvent(String event) {
        Event = event;
    }

    public String getEventKey() {
        return EventKey;
    }

    public void setEventKey(String eventKey) {
        EventKey = eventKey;
    }

    public String getPicUrl() {
        return PicUrl;
    }

    public void setPicUrl(String picUrl) {
        PicUrl = picUrl;
    }

    public String getMediaId() {
        return MediaId;
    }

    public void setMediaId(String mediaId) {
        MediaId = mediaId;
    }

    public String getFormat() {
        return Format;
    }

    public void setFormat(String format) {
        Format = format;
    }

    public String getRecognition() {
        return Recognition;
    }

    public String getMenuID() {
        return MenuID;
    }

    public void setMenuID(String menuID) {
        MenuID = menuID;
    }

    public String getLocation_X() {
        return Location_X;
    }

    public void setLocation_X(String location_X) {
        Location_X = location_X;
    }

    public String getLocation_Y() {
        return Location_Y;
    }

    public void setLocation_Y(String location_Y) {
        Location_Y = location_Y;
    }

    public String getScale() {
        return Scale;
    }

    public void setScale(String scale) {
        Scale = scale;
    }

    public String getLabel() {
        return Label;
    }

    public void setLabel(String label) {
        Label = label;
    }

    public String getTitle() {
        return Title;
    }

    public void setTitle(String title) {
        Title = title;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String description) {
        Description = description;
    }

    public String getFileKey() {
        return FileKey;
    }

    public void setFileKey(String fileKey) {
        FileKey = fileKey;
    }

    public String getFileMd5() {
        return FileMd5;
    }

    public void setFileMd5(String fileMd5) {
        FileMd5 = fileMd5;
    }

    public String getFileTotalLen() {
        return FileTotalLen;
    }

    public void setFileTotalLen(String fileTotalLen) {
        FileTotalLen = fileTotalLen;
    }

    public void setRecognition(String recognition) {
        Recognition = recognition;
    }

    /**
     * @return
     */
    public String toJson() {
        return JSON.toJSONString(this);
    }

    /**
     * @return
     */
    public String toXml() {
        return XmlUtil.toXml(this, "xml");
    }
}
